package com.credit.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.credit.entity.CreditCouponEntity;

public interface CreditCouponDao extends PagingAndSortingRepository<CreditCouponEntity, Long>, JpaSpecificationExecutor<CreditCouponEntity>{

	@Query("select count(id) from CreditCouponEntity where userId=?1 and status=0")
	Integer getCouponCountByUserId(Long userId);

}
